package com.pig4cloud.pig.flow.api.feign;

import com.pig4cloud.pig.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pig.common.core.util.R;
import com.pig4cloud.pig.common.feign.annotation.NoToken;
import com.pig4cloud.pig.flow.api.dto.StartFlowDTO;
import com.pig4cloud.pig.flow.api.dto.SuspensionDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author mobai
 */
@FeignClient(contextId = "RemoteFlowService", value = ServiceNameConstants.FLOW_SERVICE)
public interface RemoteFlowService {

	@PostMapping("/flow/startProcessInstance")
	R<String> startProcessInstance(@RequestBody StartFlowDTO startFlowDTO);


	@PostMapping("/flow/updateSuspendState")
	R updateSuspendState(@RequestBody SuspensionDTO suspensionDTO);
}
